#pragma once

//#define BOOST 1

typedef std::list<long long>        edgeListF;
//typedef boost::ptr_list<figureEdge>  edgeListF;
class Face:
  public edgeListF
{
protected:
  //edgeListF  m_edgeList;

public:
  Face(void);
  ~Face(void);

  void Clean();

  virtual void AddEdge(const figureEdge &); //insert data only in counterclockwise direction
  virtual void AddEdge(const figureVertice &, const figureVertice &);// like above
  virtual Face * Copy();
  virtual void Draw(const HWND &, const POINT &);
  virtual bool GetCirculation();
};

typedef Face::iterator          edgeForIterator;
typedef Face::reverse_iterator  edgeRevIterator;







//----------------------------------FACEFACTORY CLASS-------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------


//typedef std::list<Face>   faceList;
typedef boost::ptr_list<Face> faceList;
typedef faceList::iterator    faceListIterator;

class FaceFactory
{
protected:
  static faceList  m_faceList;
  faceListIterator m_faceIter;
public:
  FaceFactory();
  ~FaceFactory();
  virtual void AddFace(Face *);
  void Test();
  static void Draw(const HWND &, const POINT &);
  virtual void Clean();
  virtual bool GetFirstFace(Face &);
  virtual bool GetNextFace(Face &);
  bool SetFirtsEl();
  const Face * GetNextEl();
};